<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>模板语法</title>
  <script src="../js/vue.js"></script>
</head>
<body>
<!-- render outer template 包含根元素, 但vc实例的template选项不包含根元素-->
<div class="app" :x="name">
  <h2>插值语法</h2>
  <p>{{ name }} - {{ name.toUpperCase().slice(2) }}</p>
  <h2>指令语法</h2>
  <!-- v-bind 指令 -->
  <a v-bind:href="school.url.toUpperCase()"
    :y="school"
  > 点我去{{ school.name }}学习</a>
  <br/>
  <!-- 指令简写-->
  <a :href="school.url"
    :z="890"
  >点我去{{school.name}}学习2</a>
</div>
</body>
<script>
  Vue.config.productionTip = false
  const vm = new Vue({
    el: '.app',
    data: {
      name: 'alice',
      school: {
        name: '硅谷',
        url: 'https://www.atguigu.com'
      },
      htmlContent: '<p>html content</p>',
      textContent: '<p>text content</p>',
    }
  })
</script>
</html>